import { _Flex } from "./Flex";
import { FlexAlign, FlexDirection, HorizontalAlign, IColumnAttributes } from "./common";

class _Column extends _Flex {
    constructor(configuration?: IColumnAttributes) {
        super({
            direction: FlexDirection.Column,
            space: configuration?.space,
            justifyContent: FlexAlign.Center,
        });
    }

    alignItems(value: HorizontalAlign): this {
        this._element.style.alignItems = value;
        return this;
    }
}

export function Column(configuration?: IColumnAttributes) {
    return new _Column(configuration);
}